<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">

    <div class="layui-card-body think-box-shadow padding-left-40">

        <div class="layui-form-item block">
            <span class="label-required-prev color-green" style="margin-right: 20px">类型</span>

            <input type="radio" name="type" value="0" title="医生" lay-filter="type" {if (isset($vo.type) && $vo.type eq 0) or $isAddMode eq 1}checked{/if}>
            <input type="radio" name="type" value="1" title="专家" lay-filter="type" {if isset($vo.type) && $vo.type eq 1}checked{/if}>

        </div>

        <div class="layui-form-item">
            <span class="color-green label-required-prev">头像</span>
            <div><input name="head_img" type="hidden" value="{$vo.head_img|default=''}"></div>
            <script>$('[name="head_img"]').uploadOneImage()</script>
        </div>

        <div class="layui-form-item"> </div>

        <div class="layui-form-item layui-row layui-col-space15">
            <span class="color-green label-required-prev">昵称</span>
            <input name="nickname" required class="layui-input" placeholder="请输入昵称" value="{$vo.nickname|default=''}">
        </div>

        <div class="layui-form-item layui-row layui-col-space15">
            <span class="color-green label-required-prev">手机号</span>
            <input name="phone"  pattern="^1[3-9][0-9]{9}$" maxlength="11" type="tel" required class="layui-input" placeholder="请输入手机号" value="{$vo.phone|default=''}">
        </div>

        <div class="layui-form-item layui-row layui-col-space15">
            <span class="color-green label-required-prev">医院名称</span>
            <input name="hospital_name" required class="layui-input" placeholder="请输入医院名称" value="{$vo.hospital_name|default=''}">
        </div>

        <div class="layui-form-item layui-row layui-col-space15">
            <span class="color-green label-required-prev">自我介绍</span>
            <textarea name="self_info" class="layui-textarea" style="height: 100px;white-space: nowrap;">{$vo.self_info|default=''}</textarea>
        </div>



    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
    <div class="layui-form-item text-center">
        <input type="hidden" name="isAddMode" value="{$isAddMode}">
        <button class="layui-btn layui-btn-danger" id="backBtn" data-confirm="确定要取消编辑吗？" data-close type="button">取消编辑</button>
        <button class="layui-btn" type='submit'>保存数据</button>
        <!--<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>-->
    </div>
    </div>
</form>
<script>
    form.render();

    //时间范围
    laydate.render({
        elem: '#test9'
        ,type: 'time'
        ,range: true
    });
    layui.use(['layer', 'form'], function(){
        var layer = layui.layer
            ,form = layui.form;

        require(['ckeditor'], function () {
            window.createEditor('[name="content"]', {height: 500});
        })

        // 监听返回按钮的点击事件
        document.getElementById('backBtn').onclick = function(){
            layer.confirm('确定要取消编辑吗？', function(index){
                history.back(); // 执行浏览器的返回操作
                layer.closeAll();
            })
        };


    });
</script>
</fieldset>
</script>

